package com.huabo.system.oracle.mapper;

import com.hbfk.util.PageInfo;
import com.huabo.system.oracle.entity.TblIndicator;
import com.huabo.system.oracle.entity.TblMonitorRule;
import com.huabo.system.oracle.entity.TblMonitorSolution;

import java.math.BigDecimal;

public class TblMonitorSolutionMapperSqlConfig {



        public String tblMonitorSolutionService(PageInfo<TblMonitorSolution> pageInfo, BigDecimal staffid, String type) {
        StringBuffer sbSql = new StringBuffer("SELECT * FROM ( SELECT BUDGET.*,ROWNUM RNUM FROM (SELECT * from TBL_MONITOR_SOLUTION where SOLUTIONID in ( SELECT SOLUTIONID FROM TBL_MONITOR_SOLUTION_STAFF WHERE STAFFID= '"+staffid+"' ) and TYPE= '"+type+"' ");


        sbSql.append(" ) BUDGET WHERE rownum <= "+(pageInfo.getCurrentPage()*pageInfo.getPageSize())+" ) WHERE RNUM > "+pageInfo.getCurrentRecord());
        String sql = sbSql.toString();
        return sql;
    }
}
